#include <iostream>

using namespace std;

class User{
private:
    int id;//账号
    string code;//密码
    string email;//邮箱
public:
    User(int id,string code,string email="none"):id(id),code(code),email(email){}//构造函数Email设置默认值
    void getlist(){
    cout<<"id: "<<id<<"  code:"<<code<<"  email:"<<email<<endl;}//用户信息展示

};

int main()
{
    User u1(1,"lxy2004","2191745182@123.com");//创建对象1
    User u2(2,"lxy2003");//创建对象2
    u1.getlist();//展示对象1信息
    u2.getlist();//展示对象2信息
}
